<{include file="public/header.tpl"}>
<div id="page-wrapper">
	<div class="row">
		<div class="col-md-6">
            <a href="<{$app}>/user/add" class="btn btn-success">添加用户</a>
        </div>
        <div class="col-md-6">
            <form action="<{$app}>/album/add" method="post">
                <div class="form-group input-group">
                    <input type="text" class="form-control" name="key" placeholder="输入链接标题或者地址关键词搜索">
                    <span class="input-group-btn">
                      <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
                    </span>
                </div>
            </form>
        </div>
    </div>
    <{ include file="public/title.tpl" }>	  
	<div class="row">
		<ul class="list-group">
			  <form  method="post" action="<{$url}>/del/page/<{$page}><{if $search}>/search/<{$search}><{/if}><{if $gid}>/gid/<{$gid}><{/if}><{if $disable}>/disable/<{$disable}><{/if}>" onsubmit="return confirm('你确定要删除选中的用户吗?')" >
			<{if $disable ne 1}>
			<li class="list-group-item">
			
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户组：<{$select}> &nbsp;&nbsp;

				输入需要查找的用户名：
				<input type="text" size="20" id="sea" name="username" value="<{$search}>"> 
				<input onclick="search()" type="button" class="button" value="搜索用户">
			
			</li>

			<script>
				var sel=document.getElementById("sel");
				
				sel.onchange=function(){
					var gid=this.options[this.selectedIndex].value;
					window.location="<{$url}>/index/gid/"+gid;
				}
				function search(){
					var gid=sel.options[sel.selectedIndex].value;
					var sval=document.getElementById("sea").value;	
					window.location="<{$url}>/index/gid/"+gid+"/search/"+sval;

				}
			</script>
			<{/if}>
			
			<li class="list-group-item">
				<span class="label label-info">用户名</span>
				<span class="label label-info" style="width:200px">电子邮件</span>
				<span class="label label-info">注册时间</span>
				<span class="label label-info">操&nbsp;&nbsp;作</span>
			</li>
		        <{ section name=doc loop=$users }>
				<li class="<{if $users[doc].disable eq 1}>label label-info<{elseif $smarty.section.doc.index is even}>label label-info<{else}>label label-info<{/if}>" style="padding-top:5px; padding-bottom:5px">
					<{ if $users[doc].disable eq 1 }>
						<span class="label label-info">	
					<{ else }>
						<span class="label label-info">
					<{/if}>
					<{ if $users[doc].id ne 1 }>
						<input type="checkbox" name="id[]"  value="<{ $users[doc].id }>">
					<{ /if }>
				
				
					<a target="_blank" href="<{$root}>/index.php/user/index/uid/<{$users[doc].id}>"><{ $users[doc].username }></a>
					</span>
					
					<span class="label label-info" style="width:200px"><{ $users[doc].email }></span>
					<span class="label label-info"><{ $users[doc].regtime|date_format:"%Y-%m-%d" }></span>
		
					<span class="label label-info" style="width:160px;">
				
					【<a href="<{$url}>/mod/id/<{ $users[doc].id }>">修改</a>】
					<{ if $users[doc].id ne 1 }>
					【<a onclick="return confirm('确定要删除用户<{ $users[doc].username }>吗？')" href="<{$url}>/del/id/<{ $users[doc].id }>/page/<{$page}><{if $search}>/search/<{$search}><{/if}><{if $gid}>/gid/<{$gid}><{/if}><{if $disable}>/disable/<{$disable}><{/if}>">删除</a>】
					<{ /if }>
					</span>
				</li>
			<{ sectionelse }>
				<li class="list-group-item">
					该页没有用户
				</li>
			<{ /section }>
		
			<li class="list-group-item">
				
					<a href="javascript:select()">全选</a> 
					<a href="javascript:fanselect()">反选</a> 
					<a href="javascript:noselect()">全不选</a>
					&nbsp;&nbsp;选中项: 
					<input  name="dels" type="image" title="删除" value="delete" src="<{$res}>/images/delete.gif">&nbsp;&nbsp;
			</li>
		
			<li class="list-group-item" style="text-align:right">
				
					<{$fpage}>
			</li>
			 </form>
		</ul>	
	</div>
           
</div>
<{include file="public/footer.tpl"}>	


